<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>编辑个人信息</title>
    <link rel="stylesheet" href="/css/bootstrap.css">
</head>
<body class="bg-light">

<div class="container mt-5">
    <div class="card shadow">
        <div class="card-header bg-primary text-white">
            <h4 class="mb-0">✏️ 编辑个人信息</h4>
        </div>
        <div class="card-body">
            <form action="/edit-info" method="post">
                <!-- 姓名 -->
                <div class="mb-3 row">
                    <label for="userName" class="col-sm-2 col-form-label">姓名</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="userName" name="userName"
                               placeholder="请输入真实姓名"
                               th:value="${user.userName}" required>
                    </div>
                </div>

                <!-- 邮箱 -->
                <div class="mb-3 row">
                    <label for="email" class="col-sm-2 col-form-label">邮箱</label>
                    <div class="col-sm-10">
                        <input type="email" class="form-control" id="email" name="email"
                               placeholder="例如：you@example.com"
                               th:value="${user.email}" required>
                    </div>
                </div>

                <!-- 电话 -->
                <div class="mb-3 row">
                    <label for="phone" class="col-sm-2 col-form-label">电话</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" id="phone" name="phone"
                               placeholder="请输入手机号"
                               th:value="${user.phone}">
                    </div>
                </div>

                <!-- 操作按钮 -->
                <div class="d-flex justify-content-start gap-2 mt-4">
                    <button type="submit" class="btn btn-success">💾 保存</button>
                    <a href="/personal" class="btn btn-secondary">↩️ 返回</a>
                </div>
            </form>
        </div>
    </div>
</div>

</body>
</html>
